package com.usefullc.user.query;

import com.baomidou.mybatisplus.annotation.TableField;
import com.usefullc.common.enums.QueryExpressTypeEnum;
import com.usefullc.system.query.BaseQuery;
import com.usefullc.system.service.component.extend.UsefulQueryField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * @author: Sampson
 * @date: 2018-12-19 16:29
 */
@ApiModel
@Data
public class UserQuery extends BaseQuery {

    @UsefulQueryField
    @ApiModelProperty(notes = "租户ID")
    private Long tenantId;

    @UsefulQueryField(type = QueryExpressTypeEnum.GT,columnName = "tenantId")
    @ApiModelProperty(notes = "租户ID")
    private Long tenantIdStart;

    @UsefulQueryField
    @ApiParam(value = "账号/用户名")
    private String accountNo;


    @UsefulQueryField
    @ApiParam(value = "昵称")
    private String nickname;

//    @UsefulQueryField
//    @ApiModelProperty(notes = "类型")
//    private Integer type;

    @UsefulQueryField
    @ApiModelProperty(notes = "绑定")
    private Integer bind;


    @UsefulQueryField
    @ApiModelProperty(notes = "姓名")
    private String userName;


    @UsefulQueryField
    @ApiParam(value = "状态")
    private Integer status;

    @UsefulQueryField
    @ApiModelProperty(notes = "等级")
    private Integer level;


    @UsefulQueryField
    @ApiParam(value = "职务ID")
    private Long positionId;

    @UsefulQueryField
    @ApiModelProperty(notes = "性别")
    private Integer gender;

    @UsefulQueryField
    @ApiModelProperty(notes = "生日开始")
    private String birthdayStart;

    @UsefulQueryField
    @ApiModelProperty(notes = "生日结束")
    private String birthdayEnd;


    @UsefulQueryField
    @ApiParam(value = "部门ID")
    private Long deptId;


    @UsefulQueryField
    @ApiParam(value = "国家区号")
    private String areaCode;

    @UsefulQueryField
    @ApiParam(value = "手机")
    private String mobile;

    @UsefulQueryField
    @ApiParam(value = "邮件")
    private String email;

    @UsefulQueryField
    @ApiParam(value = "地区语言")
    private String local;

    @UsefulQueryField
    @ApiParam(value = "绑定租户")
    private Integer bindTenant;

    @UsefulQueryField(type= QueryExpressTypeEnum.IN,columnName = "id")
    @ApiParam(value = "用户ID")
    private List<Long> ids;


    @UsefulQueryField(type= QueryExpressTypeEnum.IN,columnName = "level")
    @ApiModelProperty(notes = "等级")
    private List<Integer> levels;

    @UsefulQueryField(columnName = "gmtExpire", format = "%Y-%m-%d", type = QueryExpressTypeEnum.GE)
    @ApiModelProperty(notes = "过期日期开始")
    private String gmtExpireStart;

    @UsefulQueryField(columnName = "gmtExpire", format = "%Y-%m-%d", type = QueryExpressTypeEnum.LE)
    @ApiModelProperty(notes = "过期日期结束")
    private String gmtExpireEnd;

}
